<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html; charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set value="${pageContext.request.contextPath}" var="path"></c:set>
<link type="text/css" href="${path}/static/web/css/AddStyle.css">
<script src="${path}/static/web/js/jquery-3.6.0.min.js"></script>
<script>
    $(function (){
        $("#sub").submit(check);
    })
    function check(){
       var money= $("#money").val();

       if (money<=0){
          alert("请重新检查输入的钱数");
          return false;
       }
    }
</script>
<html>
<head>
    <title>充值</title>
</head>
<body>
<form action="${path}/web/moneyCharge">
<table style="margin: 50px auto;">
    <tr>
        <td>当前余额:</td><td><input type="text" name="totalmoney" value="${requestScope.money}" disabled></td>
    </tr>
   <tr><td>充值金额</td><td><input type="number" name="money" id="money">元</td></tr>
    <tr><td><input type="submit" value="充值" id="sub"></td></tr>
</table>
</form>
</body>
</html>
